// Filename : happyballot.h
// Definetion of class HappyBallot
#ifndef HAPPYBALLOT_H
#define HAPPYBALLOT_H

#include <mysql/mysql.h>
#include <string>

using namespace std;
// The application class for happyGirl ballot
class HappyBallot {
public:
	HappyBallot();
	~HappyBallot();

	int ballot( int, string, string );
	int getCurrentResult( long * );
	int getNumberOfComments( int & );
	int getComments( int, int, string *, string * );
protected:
	virtual bool doBeforeAccessDB( string );	
private:
	int ballotModifyDB( int, string, string, bool );

	MYSQL mysql, *mysqlPoint;
	static const string HOST;
	static const string USERNAME;
	static const string PASSWORD;
	static const string DBNAME;
	static const unsigned int PORT; 
	static const unsigned int INTERVAL;
};

#endif

// End of happyballot.h
